package com.example.pipibee.dao.repository;

import com.example.pipibee.pojo.param.*;
import com.example.pipibee.pojo.vo.*;

import java.util.List;

/**
 * 医生端_数据层
 */
public interface DoctorRepository {

    /**
     * 插入_住院病案_主表
     *
     * @param doctorInsertParam
     * @return
     */
    int insertMrin(DoctorInsertParam doctorInsertParam);

    /**
     * 插入_住院病案_诊断表
     *
     * @param doctorDiaInsertParam
     * @return
     */
    int insertDia(DoctorDiaInsertParam doctorDiaInsertParam);

    /**
     * 插入_住院病案_手术表
     *
     * @param doctorSurInsertParam
     * @return
     */
    int insertSur(DoctorSurInsertParam doctorSurInsertParam);

    /**
     * 批量删除_住院病案_诊断表
     *
     * @param doctorDiaDeleteParam
     * @return
     */
    int deleteDia(DoctorDiaDeleteParam doctorDiaDeleteParam);

    /**
     * 批量删除_住院病案_手术表
     *
     * @param doctorSurDeleteParam
     * @return
     */
    int deleteSur(DoctorSurDeleteParam doctorSurDeleteParam);

    /**
     * ALL删除_住院病案_主表
     *
     * @return
     */
    int deleteAllMrin(DoctorDeleteAllMrinParam doctorDeleteAllMrinParam);

    /**
     * ALL删除_住院病案_诊断表
     *
     * @return
     */
    int deleteAllDia(DoctorDeleteAllDiaParam doctorDeleteAllDiaParam);

    /**
     * ALL删除_住院病案_手术表
     *
     * @return
     */
    int deleteAllSur(DoctorDeleteAllSurParam doctorDeleteAllSurParam);

    /**
     * 修改_住院病案_主表
     *
     * @param doctorUpdateMrinParam
     * @return
     */
    int updateMrin(DoctorUpdateMrinParam doctorUpdateMrinParam);

    /**
     * 修改_诊断表
     *
     * @param doctorDiaUpdateParam
     * @return
     */
    int updateDia(DoctorDiaUpdateParam doctorDiaUpdateParam);

    /**
     * 修改_手术表
     *
     * @param doctorSurUpdateParam
     * @return
     */
    int updateSur(DoctorSurUpdateParam doctorSurUpdateParam);

    /**
     * 批量出院
     *
     * @param doctorDischargeParam
     * @return
     */
    int discharge(DoctorDischargeParam doctorDischargeParam);

    /**
     * 医生端_提交病案
     *
     * @param doctorSubmitParam2
     * @return
     */
    int submit(DoctorSubmitParam2 doctorSubmitParam2);

    /**
     * 病案室_审批
     *
     * @return
     */
    int approval(DoctorApprovalParam2 doctorApprovalParam2);

    /**
     * 根据病案号查询病案装态
     *
     * @param mrNum
     * @return
     */
    int lookAppByMrNum(Long mrNum);

    /**
     * 查询填充_手术表
     *
     * @param doctorSurUpdateSelectParam
     * @return
     */
    DoctorSurUpdateSelectVO updateSurSelect(DoctorSurUpdateSelectParam doctorSurUpdateSelectParam);

    /**
     * 查询填充_诊断表
     *
     * @param doctorDiaUpdateSelectParam
     * @return
     */
    DoctorDiaUpdateSelectVO updateDiaSelect(DoctorDiaUpdateSelectParam doctorDiaUpdateSelectParam);

    /**
     * 根据住院病案ID查询主要诊断个数
     *
     * @param mrInId
     * @return
     */
    int diaLooker(String mrInId);

    /**
     * 根据住院病案ID查询主要手术个数
     *
     * @param mrInId
     * @return
     */
    int surLooker(String mrInId);

    /**
     * 根据ID查询住院病案是否存在
     *
     * @param id
     * @return
     */
    int mrinLooker(String id);

    /**
     * 分页模糊查询病案列表
     *
     * @param doctorListSelectParam
     * @return
     */
    List<DoctorListSelectVO> list(DoctorListSelectParam doctorListSelectParam);

    /**
     * 分页模糊查询病案列表_总条数
     *
     * @param doctorListSelectParam
     * @return
     */
    Long count(DoctorListSelectParam doctorListSelectParam);

    /**
     * 根据住院号查询住院病案ID
     *
     * @param mrNum
     * @return
     */
    String selectIdByMrNum(Long mrNum);

    /**
     * 根据住院病案ID查询住院病案_主表_基本信息
     *
     * @param id
     * @return
     */
    DoctorSelectMrinVO selectMrinById(String id);

    /**
     * 根据住院病案ID查询住院病案_诊断表
     *
     * @param mrInId
     * @return
     */
    List<DoctorSelectDiaVO> selectDiaById(String mrInId);

    /**
     * 根据住院病案ID查询住院病案_手术表
     *
     * @param mrInId
     * @return
     */
    List<DoctorSelectSurVO> selectSurById(String mrInId);
}
